// eslint-disable-next-line
import {
  UserLayout,
  BasicLayout,
  RouteView,
  BlankLayout,
  PageView
} from '@/layouts'
import {
  bxAnaalyse,
  zhuye,
  base,
  caigou,
  caiwu,
  customer,
  fapiao,
  kucun,
  xiaoshou,
  zhibiao,
  caigoudan,
  caigoudingdan,
  caigouhetong,
  caigoukehu,
  caigoutongji,
  cangkuguanli,
  chukudan,
  chukumingziyuhuizong,
  dangqiankucun,
  gonghuokehu,
  jinxiangfapiao,
  jinxiaocunhuizong,
  kucundiaobo,
  kucunpancun,
  morenshezhi,
  qichushuju,
  qitakehu,
  qiyexinxi,
  rukudan,
  rukumingxiyuhuizong,
  shangpinguanli,
  shangpintongji,
  xiaoshoudan,
  xiaoshoudingdan,
  xiaoshouhetong,
  xiaoshoutongji,
  xiaoxiangfapiao,
  xitongshezhi,
  yuangongguanli
} from '@/core/icons'

export const asyncRouterMap = [

  {
    path: '/',
    name: 'index',
    component: BasicLayout,
    meta: {
      title: '首页'
    },
    redirect: '/index/Home',
    children: [
      // 首页-工作台
      {
        path: '/index/Home',
        name: 'Home',
        component: () => import('@/views/index/Home'),
        meta: {
          title: '会员统计',
          icon: caiwu,        
        }
      },
      //客户管理
      {
        path: '/customerManage',
        name: 'customerManage',
        component: () => import('@/views/index/setting'),
        meta: {
          title: '参数设置',
          icon: caiwu,
          permission: ['Page:CustomerManage', 'admin']
        },

      },
       {
        path: '/index/userPage',
        name: 'userPage',
        component: () => import('@/views/index/userPage'),
        meta: {
          title: '所有会员',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
      {
        path: '/index/loanPage',
        name: 'loanPage',
        component: () => import('@/views/index/loanPage'),
        meta: {
          title: '借款列表',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
      {
        path: '/index/wthdrawal',
        name: 'wthdrawal',
        component: () => import('@/views/index/wthdrawal'),
        meta: {
          title: '提现列表',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
      {
        path: '/index/helpPage',
        name: 'helpPage',
        component: () => import('@/views/index/helpPage'),
        meta: {
          title: '使用帮助',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
      {
        path: '/index/contractPage',
        name: 'contractPage',
        component: () => import('@/views/index/contractPage'),
        meta: {
          title: '合同||关于我们',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
      {
        path: '/index/orderPage',
        name: 'orderPage',
        component: () => import('@/views/index/orderPage'),
        meta: {
          title: '订单状态',
          icon: caiwu,
          permission: ['Page:ContractManage', 'admin']
        },
      },
  



      
    ]
  },
  {
    path: '*',
    redirect: '/404',
    hidden: true
  }
]

/**
 * 基础路由
 * @type { *[] }
 */
export const constantRouterMap = [


  {
    path: '/userCenter',
    component: BasicLayout,
    redirect: '/userCenter',
    name: 'userCenter',
    hidden: true,
    children: [{
      path: '/userCenter',
      component: () => import('@/views/userCenter/Index')
    }]
  },
  {
    path: '/user',
    component: UserLayout,
    redirect: '/user/login',
    hidden: true,
    children: [{
      path: 'login',
      name: 'login',
      component: () => import( /* webpackChunkName: "user" */ '@/views/user/Login')
    },
    {
      path: 'register',
      name: 'register',
      component: () => import( /* webpackChunkName: "user" */ '@/views/user/Register')
    },
    {
      path: 'register-result',
      name: 'registerResult',
      component: () => import( /* webpackChunkName: "user" */ '@/views/user/RegisterResult')
    },
    {
      path: 'recover',
      name: 'recover',
      component: () => import( /* webpackChunkName: "user" */ '@/views/user/Recover')
    },
    ]
  },



  {
    path: '/404',
    component: () => import( /* webpackChunkName: "fail" */ '@/views/exception/404')
  }

]

